#!/bin/bash

projectName="testyZlecenia"

projectsDir=/home/radek/projekty/
projectDir=$projectsDir/$projectName
sfsDir=$projectDir/lib/vendor
sfDir=$projectDir/lib/vendor/symfony
sfTGZ=/home/radek/programy/symfony-1.4.6.tgz
dbName=testyZlecenia
dbPasswd=has10elko

mkdir $projectDir
mkdir -p $sfsDir
tar zxpf $sfTGZ -C $sfsDir
cd $sfsDir
mv symfony-1.4.6 symfony

cd $projectDir
php $sfDir/data/bin/symfony generate:project $projectName
php symfony generate:app frontend
chmod 777 cache/ log/

php symfony configure:database "mysql:host=localhost;dbname=$dbName" root $dbPasswd
php symfony doctrine:build-schema #tworz YAMAL sql file
php symfony doctrine:build --model --forms --filters

php symfony doctrine:generate-module --with-show --non-verbose-templates  frontend Pracownicy testyZlecenia

#find . -printf "%m %u %g %P \n" | awk '{print $1;}'




